package com.qf.auth.feign;

import com.qf.common.bean.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author 千锋健哥
 */
@FeignClient(name = "qf-center-data")
public interface CheckCodeFeign {

    /**
     * 保存验证码到redis中
     * @param phone
     * @param code
     * @return
     */
    @PostMapping("/data/checkcode/saveCodeToRedis")
    public R save(@RequestParam(value = "phone") String phone,
                  @RequestParam(value = "code") String code);

    /**
     * 根据电话号到redis中获取验证码
     * @param phone
     * @return
     */
    @PostMapping("/data/checkcode/getCode")
    public R<String> getCode(@RequestParam(value = "phone") String phone);
}
